package com.yygo.service.impl;

import com.yygo.Constants;
import com.yygo.dao.MoneyTransferDao;
import com.yygo.dao.PrepaymentDao;
import com.yygo.model.*;
import com.yygo.model.enums.TransferType;
import com.yygo.service.MoneyService;
import com.yygo.service.PrepaymentManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * Created by tiansha on 2015/11/7.
 */
@Service("prepaymentManager")
public class PaypaymentManagerImpl extends GenericManagerImpl<Prepayment, Long> implements PrepaymentManager {

    private PrepaymentDao prepaymentDao;

    @Autowired
    private MoneyService moneyService;

    @Autowired
    private MoneyTransferDao moneyTransferDao;

    @Autowired
    public PaypaymentManagerImpl(PrepaymentDao prepaymentDao) {
        super(prepaymentDao);
        this.prepaymentDao = prepaymentDao;
    }

    @Override
    public List<Prepayment> getPendingPrepayments(User user) {
        return prepaymentDao.getPendingPrepayments(user);
    }

}
